home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MIDICraft's MIDINET CD-ROM
/
MIDICraft's MIDINET CD-ROM.iso
/
DOSUTILS
/
EXCHSYX.DOC
< prev
next >
Wrap
Text File
|
1996-11-14
|
7KB
|
188 lines
******************************
SENDSYX/RECVSYX v1.1
(DOS with MPU, SOUNDBLASTER)
send and receive sysex and other midi messages
by Guenter Nagler
1996
(gnagler@ihm.tu-graz.ac.at)
******************************
[1] BACKGROUND
My KORG i3 is connected to my PC with a midi cable.
This allows to control the keyboard with midi commands
and general sysex dumps.
First I needed a simply utility to set the keyboard into
General midi mode, because my midi player ignored all system
exclusive messages (sysex).
send:
The SENDSYX utility reads binary .SYX files or text files containing
midi bytes in hexadecimal format or some predefined midi shortcuts (like
GMon) and sends the data through the MPU or Soundblaster midi interface to
the keyboard. Sometimes the keyboard will send back a reply. The SENDSYX utility
tries to catch these messages.
To exchange data via midi dumps the utility allows to read only
a part of a binary file and encode them into midi dump (7 bytes => 8 midi codes).
receive:
The RECVSYX utility listens to the keyboard and waits for a dump.
It saves the midi system exclusive message into a binary or a text file.
[2] FILES DESCRIPTION
SENDSYX.EXE..........MSDOS executable for sending midi sysex and other commands
RECVSYX.EXE..........MSDOS executable for receiving midi sysex and other commands
EXCHI3.DOC..........this file, showing usage of SENDSYX.EXE RECVSYX.EXE
[3] COPYRIGHT
SENDSYX and RECVSYX (c) 1996 were created by Guenter Nagler.
SENDSYX and RECVSYX are free and may be used as you wish with this one exception:
You may NOT charge any fee or derive any profit for distribution
of SENDSYX and RECVSYX. Thus, you may NOT sell or bundle SENDSYX/RECVSYX
with any product in a retail environment (shareware disk distribution,
CD-ROM, etc.) without permission of the author.
You may give SENDSYX and RECVSYX to your friends, upload it to a BBS, or ftp it to
another internet site, as long as you don't charge anything for it.
[4] DISCLAIMER
SENDSYX and RECVSYX were designed to read and write midi sysex messages.
Communications are done using original Roland MPU-401 (tm) and
Creative Labs Soundblaster (tm) midi interfaces.
Use SENDSYX at your own risk. Anything you do with SENDSYX is your
responsibility, and not the author's. Any damage caused to any person,
computer, software, hardware, company, or business by running SENDSYX
is your responsibility, and the author will not be liable.
If you don't understand these terms, or are not sure of something, or
are afraid something bad might come of using SENDSYX, don't use it!
You are here forewarned.
[5] INSTALLATION
Simply copy SENDSYX.EXE and RECVSYX into a directory that is in your path.
C:\> SENDSYX
C:\> RECVSYX -h
you should get the usage text (see next section)
[6] USAGE
usage: sysex [-noreply] [-skip #] [-count #] [-echo] [-enc] [-raw] [hex] [cmd] [file] ...
-noreply don't wait for a reply
-skip # skip bytes of next binary file
-count # read count bytes of next binary file (default: read till end)
-echo echo sent bytes in hexadecimal format
-enc dump encode bytes read from binary files
-raw do not encode bytes read from binary files
hex send byte (e.g. f0 42 a f7)
cmd send command (e.g. gmon notesoff ...)
file end content of binary or hex file
All parameters can be used more than once. Text files can contain hex, cmd, file
-skip,-count,-enc only affect next binary file
usage: recvsyx [-h] [-hex] [-echo] [-sysex] [filename]
-hex save received data to text file (default: binary file)
-echo echo the received data (hexadecimal)
-sysex save only sysex messages (F0 ... F7)
filename save data to filename (default: recv.syx)
Important:
To exchange data with the keyboard the keyboard must be forced to
receive and send midi events (e.g. EXCL ON option for korg i3).
Some keyboard modes might not send any data (e.g. korg i3, song 9
in General Midi mode)
Important:
This program works only with a MPU-401 or Soundblaster compatible
midi interface. For soundblaster cards the environment variable BLASTER
must be set to select the correct soundcard port number (A220,A240,A260,A280).
The MPU midi port must be 300 or 330 or specified in the environment variable
MPU (hexadezimal port number).
e.g.
set BLASTER=A240 I5 D0 H5 P300 T6
set MPU=210
sendsyx currently supports following shortcut commands (cmd parameter):
GMon F0 7E 7F 09 01 F7
Identify F0 7E 7F 06 01 F7
XGon F0 08 43 10 4c 00 00 7e 00 f7
GSon F0 0a 41 10 42 12 40 00 7f 00 41 f7
GSoff F0 0a 41 10 42 12 40 00 7f 7f 42 f7
LocalOn sets control 7a to 7f for all channels
LocalOff sets control 7a to 0 for all channels
NotesOff sets control 7b to 0 for all channels
OmniOff sets control 7c to 0 for all channels
OmniOn sets control 7d to 0 for all channels
PolyOff sets control 7e to 0 for all channels
PolyOn sets control 7f to 0 for all channels
SOX F0
EOX F7
The command set can be advanced by writing a binary or text file
containing hex and cmd sequences. These files can be used
in command line or text files.
Batch files for simple settings simplify use of sendsyx.
[7] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
WWW: http://hgiicm.tu-graz.ac.at/Cpub
contains all my dos/unix midi programs
EMAIL: gnagler@ihm.tu-graz.ac.at
[8] EXAMPLES
set General Midi Mode:
C:\> sendsyx -echo gmon
F0 7E 7F 09 01 F7
6 bytes sent, waiting for reply... no reply
A batch file the sets General Midi Mode:
GMON.BAT:
@echo off
sendsyx -noreply gmon
Start the batch file GMON.BAT:
C:\> gmon
A batch file that sends part of a binary file as a dump:
@echo off
sendsyx -echo f0 42 30 39 4c -skip 0xd67 -encode %1 f7
C:\> sendpcg korg.pcg
F0 42 30 39 4C <encoded data> F7
9310 bytes sent, waiting for reply...
reply: f0 42 30 39 26 f7
In the manual of the keyboard it can be read what this reply means:
"data load completed"
receive any data from midi interface (play on keyboard):
C:\> recvsyx -echo -hex any.syx
F8 F8 F8 F8 F8 F8 F8 F8
90 2D 5B F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8
90 2F 57 F8
80 2D 40 F8 F8 F8 F8 F8 F8
80 2F 40 F8
receive a sysex dump (send manually from keyboard):
C:\> recvsyx -sysex dump.syx
recording...
*
[9] CHANGES
v1.0 to v1.1:
* allow MPU port other than 300 or 330 (environment variable MPU)